﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="ChiTietTinTuc.aspx.cs" Inherits="ChiTietTinTuc" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentNoiDung" runat="Server">
    <div id="main-content">
        <!-- Main Content Section with everything -->
        <!-- Page Head -->
        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <h3 style="cursor: s-resize;">
                    Tin tức:
                    <asp:Label runat="server" ID="lbTenSanPham"></asp:Label></h3>
                <div class="clear">
                </div>
            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <fieldset>
                    <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
                    <div>
                        <form action="" method="post">
                        <fieldset>
                            <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
                            <div class="formleft">
                                <p>
                                    <label>
                                        Tiêu đề</label>
                                    <asp:TextBox ID="txtTenSanPham" MaxLength="100" runat="server" CssClass="text-input large-input"></asp:TextBox>
                                </p>
                                <div class="formleft">
                                    <p>
                                        <label>
                                            Loại bài</label>
                                        <asp:DropDownList runat="server" ID="ddlLoaiBai1">
                                        </asp:DropDownList>
                                    </p>
                                </div>
                                <div class="formleft">
                                    <p>
                                        <label>
                                            Ngôn ngữ</label>
                                        <asp:DropDownList runat="server" ID="ddlLang1">
                                        </asp:DropDownList>
                                    </p>
                                </div>
                            </div>
                            <div class="formright">
                                <p>
                                    <label>
                                        Hình ảnh</label>
                                    <input type="file" id="inputFile" name="inputFile" runat="server" />
                                    <asp:CheckBox ID="chkDeleteFile" runat="server" Text="Delete" />
                                    <asp:TextBox ID="txtHinhAnh" runat="server" Width="450px" Visible="false">
                                    </asp:TextBox>
                                </p>
                                <p>
                                    <input type="image" width="200px" heigh="200px" id="imageDemons" name="imageDemons"
                                        runat="server" src="/images/noimage.jpg" />
                                </p>
                            </div>
                            <div style="padding-top: 130px;">
                                <p>
                                    <table>
                                        <tr>
                                            <td>
                                                Mô tả :
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtMoTa" MaxLength="140" TextMode="MultiLine"></asp:TextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </p>
                            </div>
                            <div>
                                <p>
                                    <table>
                                        <tr>
                                            <td>
                                                Nội dung :
                                            </td>
                                            <td>
                                                <FCKeditorV2:FCKeditor ID="txtNoiDung" runat="server" Height="300px">
                                                </FCKeditorV2:FCKeditor>
                                            </td>
                                        </tr>
                                    </table>
                                </p>
                            </div>
                            <div class="clear">
                            </div>
                            <div class="clear">
                            </div>
                            <p>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTenSanPham"
                                    Display="Dynamic" ValidationGroup="vdSanPham" ErrorMessage="Vui lòng nhập tên công ty!"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Button runat="server" ID="btnOK" CssClass="button" Text="Hoàn tất" OnClick="btnOK_OnClick"
                                    OnClientClick="return Check();" ValidationGroup="vdSanPham" />
                            </p>
                        </fieldset>
                        <div class="clear">
                        </div>
                        <!-- End .clear -->
                    </div>
                </fieldset>
                <div class="clear">
                </div>
                <!-- End .clear -->
                </form>
            </div>
            <!-- End .content-box-content -->
        </div>
        <!-- End .content-box -->
        <div id="footer">
            <small></small>
        </div>
        <!-- End #footer -->
    </div>
    <!-- End #main-content -->

    <script type="text/javascript">
        function Check() {
            var e = document.getElementById('<%= txtMoTa.ClientID %>');
            if (e.value.length > 149) {
                alert('Mô tả không được nhập trên 150 ký tự');

                this.focus(e); 
                return false;
            }
        }
    
    </script>

</asp:Content>
